/* 虚拟摇杆样式 */
.joystick-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 120px;
    height: 120px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    z-index: 100;
    touch-action: none;
    display: none; /* 默认隐藏，只在移动设备上显示 */
}

.joystick-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 101;
}


.back-button {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    z-index: 100;
    cursor: pointer;
}

/* 媒体查询：只在移动设备上显示虚拟摇杆 */
@media (max-width: 768px) {
    .joystick-container {
        display: block;
    }
    
    /* 隐藏原来的触摸控制 */
    .touch-controls {
        display: none;
    }
}

/* 确保虚拟摇杆不会阻挡胜利和失败弹窗 */
.victory-dialog,
.defeated-dialog {
    z-index: 200; /* 确保弹窗在摇杆上方 */
}